import mitt from 'mitt'

type RowType = {
	[property: string]: any
}
type RowsType = RowType[]

export type Events = {
	TABLE_MULTIPLE_SWITCH_EVENT: {
		rows: any[];
		title: string;
		isSwitchOnFlag: boolean;
	}
	MENU_MIN_FLAG: boolean
	TABLE_MULTIPLE_DELETE_EVENT: RowsType
	USER_POSITION: string[]
	HANDLE_GO_TO_ADMIN_FN: void
	DIALOG_SUBMIT_EVENT: void
	MULTIPLE_DELETE_EVENT: void
	MULTIPLE_SWITCH_ON_EVENT: void
	MULTIPLE_SWITCH_OFF_EVENT: void
};

const emitter = mitt<Events>();
export default emitter